Printer drivers using filters that are operating system-independent and printer-indendent

ABSTRACT

A printer driver uses filters that are operating system-independent and printer-independent. Print requests and corresponding print data are received by the printer driver and converted into an internal representation that is both operating system-independent and printer-independent. The data to be printed is then passed through a print pipeline where one or more of a plurality of print filters are applied to the data. As a final stage in the print pipeline, the data is converted to a printer-dependent representation. In one embodiment, one or more of the plurality of filters used in the print pipeline are stored in a dynamic link library (DLL).

RELATED APPLICATIONS

[0001] This application is a continuation of prior application Ser. No.09/305,241, filed May 4, 1999, entitled “Printer Drivers Using FiltersThat Are Operating System-Independent and Printer-Independent”, which ishereby incorporated by reference.

TECHNICAL FIELD

[0002] This invention relates to printers, and more particularly toprinter drivers having filters that are both operatingsystem-independent and printer-independent.

BACKGROUND

[0003] Printers have become an indispensable peripheral component foruse with computers. Generally, data that is to be printed by anapplication is transferred to a “printer driver” via an operatingsystem. The printer driver is a software module that translates the datato be printed into a format that is understandable by the printer.Various additional formatting options may also be provided by thedriver, such as adding water marks, re-sizing the data for a page (e.g.,expanding or shrinking the data to fit on a particular number of pages),etc.

[0004] Printer drivers are typically written by the printer manufacturerand are designed to work with a particular printer as well as aparticular operating system. Different drivers generally need to bewritten for each possible printer/operating system combination that theprinter manufacturer wants to support. Maintaining separate printerdrivers for each printer/operating system combination is a particularlyburdensome task for the printer manufacturer. Furthermore, given thatmany of the same formatting options are provided by each of the drivers(e.g., adding water marks), maintaining separate printer drivers foreach printer/operating system combination causes repetitive efforts aseach formatting option is designed into each of the printer/operatingsystem combinations.

[0005] Additionally, situations can arise where it is desirable to alterthe programming of a printer driver. Examples of such situations includethe need to change the code for one of the formatting options in orderto fix a bug or other error in the code, to provide increasedfunctionality, etc. However, changing the programming of any one of theformatting options requires recompiling the entire printer driver,including those parts of the driver not affected by the change informatting option. Additionally, if the formatting option is changedafter the printer driver has been distributed to the public, then theentire re-compiled driver must be re-distributed and re-installed by thepublic.

[0006] This invention addresses these disadvantages, providing animproved way to generate printer drivers.

SUMMARY

[0007] A printer driver in accordance with the invention uses filtersthat are operating system-independent and printer-independent. Printrequests and corresponding print data are received by the printer driverand converted into an internal representation that is both operatingsystem-independent and printer-independent. The data to be printed isthen passed through a print pipeline where one or more of a plurality ofprint filters are applied to the data. As a final stage in the printpipeline, the data is converted to a printer-dependent representation.

[0008] According to one aspect of the invention, a filter list ismaintained by the printer driver. The filter list identifies the printfilters that are part of the print pipeline and also identifies theorder in which the filters are to be applied to the data to be printed.

[0009] According to another aspect of the invention, one or more of theplurality of filters used in the print pipeline are stored in a dynamiclink library (DLL). The filters in the DLL are bound to the printerdriver at run-time, allowing the filters in the DLL to be generated(and/or changed) after the printer driver is compiled.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The present invention is illustrated by way of example and notlimitation in the figures of the accompanying drawings. The same numbersare used throughout the figures to reference like components and/orfeatures.

[0011]FIG. 1 shows an exemplary network system in which the inventioncan be used.

[0012]FIG. 2 illustrates an exemplary non-network system in which theinvention can be used.

[0013]FIG. 3 illustrates an exemplary system architecture including aprinter driver in accordance with the invention.

[0014]FIG. 4 is an exemplary illustration of the flow of print requestsand corresponding data through a printer driver in accordance with theinvention.

[0015]FIG. 5 is a flowchart illustrating an exemplary process for usinga print pipeline in accordance with the invention.

[0016]FIG. 6 illustrates an exemplary computer system in which theinvention can be implemented.

DETAILED DESCRIPTION

[0017] The invention can be used in either a network environment or anon-network environment. The invention provides an improved way togenerate, operate, and maintain printer drivers. The printer drivers canbe located at a client computer, an intermediary computer, a printer, orany combination thereof.

[0018]FIG. 1 shows an exemplary network system in which the inventioncan be used. Generally, the network system includes multiple (n) clientcomputers 102 and 104 and one or more networked printers 106. Thecomputers 102 and 104 communicate with printers 106 over a datacommunications network 108. In the illustrated example, datacommunications network 108 can include one or more of: the Internet,PSTN networks, local area networks (LANs), and private wide areanetworks (WANs). Communication between client computers 102 and 104 andprinters 106 can be via any of a variety of conventional communicationprotocols. Client computers 102 and 104 transfer data to be printed toprinters 106 via network 108.

[0019] When an application executing on one of computers 102 or 104wants to print data, the application provides (typically via anoperating system) a print request to a printer driver (not shown inFIG. 1) that corresponds to one of printers 106. The printer drivertranslates the print request and corresponding data into arepresentation or form that is understandable to the printer 106 (thatis, in the printer's “language”). Various additional formatting optionsmay also be implemented by the printer driver. For example, the size ofthe data being printed may be increased or decreased, a watermark may beadded, the order of pages being printed may be changed, etc. Once suchtranslation and formatting options have been performed, the appropriateprinter 106 can print the data.

[0020] One or more print servers 110 may also be coupled to network 108.Print server 110 acts as an intermediary between the client computers102 and 104 and the printers 106. Data that is to be printed istransferred from client computers 102 and 104 to print server 110. Printserver 110 then assumes responsibility for transferring the data toprinters 106.

[0021] The printer driver for a printer 106 can be implemented at theclient 102 or 104, at the printer 106, at the print server 110, oralternatively at a combination of one or more of the client 102 or 104,printer 106, and print server 110.

[0022]FIG. 2 illustrates an exemplary non-network system in which theinvention can be used. A computer 122 is coupled directly to a printer124. Computer 122 and printer 124 communicate with each other directlyvia connection 126 without accessing a network. The printer driver (notshown) for printer 124 can be implemented at the computer 122 and/or theprinter 124.

[0023] The printers 106 of FIG. 1 and printer 124 of FIG. 2 can be anyof a wide variety of conventional printing or output devices. Suchoutput devices can be physical devices (e.g., laser printers, inkjetprinters, dot matrix printers, facsimile machines, plotters, etc.),software applications (e.g., a facsimile program running on a computer),data structures (e.g., files to be stored to disk or transferred over anetwork), etc.

[0024]FIG. 3 illustrates an exemplary system architecture including aprinter driver in accordance with the invention. System 150 can beeither a computer (such as client computers 102 or 104 of FIG. 1,printer server 110 of FIG. 1, or computer 122 of FIG. 2) oralternatively a printer (such as printer 106 of FIG. 1 or printer 124 ofFIG. 2). System 150 includes an operating system 152, one or moreapplications 154, a printer driver 156, one or more dynamic linklibraries (DLLs) 158, and a network/printer interface 160. Only oneprinter driver 156 has been illustrated in FIG. 3 for ease ofexplanation and to avoid cluttering the drawings. It is to beappreciated that system 150 can include multiple drivers 156.

[0025] One or more of applications 154 can provide a print request andcorresponding data to be printed to operating system 152. Operatingsystem 152 provides the print request and corresponding data to printerdriver 156, which translates and formats the print request andcorresponding data into a representation that is understandable by theprinter. The translated and formatted request and data are then providedto network/printer interface 160 which transfers the request and data tothe appropriate printer (either via a network or directly to theprinter).

[0026] Operating system 152 represents any of a wide variety ofconventional operating systems. Examples of such operating systemsinclude, but are not limited to, any of the “Windows” brand of operatingsystems available from Microsoft Corporation of Redmond, Wash., or theMac OS available from Apple Computer of Cupertino, Calif.

[0027] Network/printer interface 160 is an input/output (I/O) interfacethat allows system 150 to communicate with either computer(s) orprinter(s) directly or via a network.

[0028] Printer driver 156 includes a controller 162, an operating system(OS) interface 164, and one or more print filters 166. Operating systeminterface 164 receives print requests and corresponding data fromoperating system 152. The print request and corresponding data arereceived from the operating system in an operating system-dependentformat. This operating system-dependent format is a representation ofthe request and data that is understandable to the operating system.Interface 164 converts the request and data into an operatingsystem-independent format. That is, interface 164 converts the requestand data to an internal representation used by printer driver 156.

[0029] Interface 164 also generates a “settings” data structure that isused by other components of driver 156. The settings structureidentifies various aspects of how the data corresponding to the printrequest is to be printed (e.g., order of pages, size of fonts, pagebreaks, use of watermarks or copyright notices, etc.), as well as thedestination device(s) for the data. This settings structure is passedfrom filter to filter by controller 162, allowing each invoked filter tochange the aspects as programmed.

[0030] Controller 162 coordinates the various components of printerdriver 156, ensuring that the proper filters are applied to receiveddata in the proper order. Controller 162 also maintains a filter list168 listing identifiers of the filters 166 (as well as any filters 170,discussed in more detail below). Any one of the filters 166 or 170 canbe invoked by controller 162 using a call, instruction, or otheridentifying information regarding the filter maintained in filter list168.

[0031] Each of the filters 166 and 170 alters or modifies the printingformat of the data to be printed or a destination(s) of the data to beprinted. Examples of altering the printing format of the data to beprinted include page manipulation (e.g., causing the pages of data to beprinted so that physical pages are printed from back to front,associating multiple logical pages with a single physical page, etc.)and image manipulation (e.g., increasing or reducing the size of thedata to be printed on a single physical page, adding a watermark to thedata, adding a copyright notice to the data, etc.). An example ofaltering the destination of the data to be printed is a routing filterthat causes the data (or just the print request without thecorresponding data) to be routed to a file or to an additional printer.

[0032] In the illustrated example, filters 166 also include at least one“output” or “page description language” filter. The output filterconverts the print request and corresponding data from the internalrepresentation used by printer driver 156 to a representation that isunderstandable by the printer. Output filters can be included in filters166 to generate virtually any language representation, allowing printerdriver 156 to support an unlimited number of devices. An example of sucha conversion is to a page description language (PDL) such as thewell-known PCL5, PCL6, PCL XL, or Postscript languages.

[0033] Upon receiving a translated print request and corresponding data,controller 162 invokes the appropriate filters 166. The order in whichthe filters are applied is determined by the order in which the filteridentifiers appear in filter list 168.

[0034] Which of the filters is to be applied is provided to printerdriver 156 by operating system 152 along with the print request. Thisidentification can be generated by operating system 152, oralternatively by the application 154 that initiated the print request.In the illustrated example, operating system 152 provides a userinterface (UI), upon receipt of the print request from the application154, that prompts the user for feedback regarding which filters are tobe applied. For example, a user may be able to select (e.g., via menuoption or radio button) that a watermark is to be included, or that thepages are to be printed in reverse order. Alternatively, a component ofprinter driver 156 (e.g., controller 162) could provide a UI thatprompts the user for feedback regarding which filters are to be applied.

[0035] In the illustrated example, printer driver 156 is a softwaremodule that is compiled to include filters 166. Thus, the print filters166 are made a part of printer driver 156 at the time driver 156 iscompiled.

[0036] Additionally, one or more print filters 170 can be bound orlinked to driver 156 at run-time using a run-time loadable module(s). Incontrast to filters 166, filters 170 are in a module(s) that is bound tothe driver 156 at run-time of driver 156 by the operating system 152. Inthe illustrated example, filters 170 are implemented in one or moredynamic link libraries (DLLs).

[0037] Incorporating print filters 170 as DLLs provides multipleadvantages. By using DLLs, the filter need not be written at the timethe printer driver 156 is written, compiled, and publicly distributed.This is particularly useful, for example, in situations where no needfor a particular filter exists at the time the printer driver isdistributed, but such a need arises at a later time. An additionaladvantage is that filters can be changed individually without requiringrecompiling of the entire printer driver. For example, if a revisedversion of a filter 170 is available after the original version of thefilter has been distributed to users (e.g., to provide additionalfunctionality or to correct an error/bug in the original version), therevised filter could be replaced without requiring replacement ormodification of any other filters 166 or 170 or the remainder of printerdriver 156.

[0038] An additional driver interface is included in system 150 thatallows developers (e.g., third party developers) to add filters 170.This additional driver interface can be implemented as part of printerdriver 156 (e.g., part of controller 162) or alternatively as one ofapplications 154 that has access to filter list 168 or as part ofoperating system 152. The additional driver interface insertsidentifiers of filters 170 into filter list 168.

[0039] Identifiers of the filters 170 are also added to filter list 168.The identifiers of filters 170 are inserted into list 168 at locationsthat are identified (e.g., by the filter designer) at the time thefilters 170 are added to system 150. The appropriate location isidentified (e.g., by the filter designer) via the additional driverinterface.

[0040]FIG. 4 is an exemplary illustration of the flow of print requestsand corresponding data through the printer driver 156 of FIG. 3 inaccordance with the invention. A print request and corresponding dataare received from the operating system as an operating system command202. The data is then translated into an internal language by interface164 of FIG. 3 (block 204). One or more print filters are then applied tothe data (blocks 206) to alter the format of the data to be printed. Thedata is then provided to one or more output filters (blocks 208) forconversion into a format understandable by the output device (e.g., aprinter or facsimile machine), such as the PCL5 or PCL6 page descriptionlanguages. The filters that are applied (blocks 206 and 208) arereferred to as the “print pipeline” 210. The converted data is thentransferred to the appropriate output device(s).

[0041] Alternatively, the print pipeline 210 may be implemented overmultiple devices. For example, the one or more print filters applied tothe data in blocks 206 may be implemented at the computer where theprint request was initiated (e.g., computer 102 of FIG. 1). Once all ofthe print filters in blocks 206 have been applied to the data, this“intermediate” filtered data can be provided to another device, such asprint server 110 or printer 106 of FIG. 1, where the output filters(blocks 208) are applied.

[0042]FIG. 5 is a flowchart illustrating an exemplary process for usinga print pipeline in accordance with the invention. The process of FIG. 5is implemented by system 150 of FIG. 3, and in the illustrated exampleis performed in software. FIG. 5 is described with additional referenceto components in FIG. 3.

[0043] A print request and corresponding data are first received by theprinter driver 156 (step 222). The received request and correspondingdata are translated into an internal language by interface 164 (step224). Controller 162 then determines the first filter to apply to thedata (step 226). The first filter to apply is dependent, as discussedabove, on both the filters identified in the print request as well asthe ordering of filters in the filter list 168.

[0044] The filter that is determined in step 226 is then applied to thedata to be printed (step 228). The filter is applied to the data bycontroller 162 invoking the filter which in turn alters the data inaccordance with the instructions programmed into the filter. Once thefilter determined in step 226 finishes executing, controller 162determines whether there are additional filters to be applied (step230). If there are additional filters to be applied then controller 162determines the next filter to apply (step 232). The determinations insteps 230 and 232 are both based on the filters identified in the printrequest as well as the ordering of filters in the filter list 168. Oncethe next filter to apply is determined, controller 162 applies thatfilter (step 228). Once controller 162 determines in step 230 that noadditional filters are to be applied, the process ends (step 234).

[0045]FIG. 6 illustrates an exemplary computer system in which theinvention can be implemented. The system 252 includes a system bus 254for communicating information, a processor(s) 256 coupled with the busfor processing information and instructions, and a system memory (e.g.,random access memory) 258 coupled with the bus 254 for storinginformation and instructions for the central processor 256. A displaymemory 260, coupled to a display device 262, is also coupled to the bus254. Display memory 260 provides storage for data to be displayed ondevice 262. Alternatively, system 252 may not include display memory 260and use system memory 258 for storage of data to be displayed on device262. The display device 262 can be any device suitable for creatinggraphic images and/or alphanumeric (or ideographic) characters, such asa liquid crystal device or cathode ray tube.

[0046] System bus 254 is coupled to one or more input/output (I/O) busesrepresented as I/O bus 264 via bridge(s) 266. I/O bus 264 providescommunication between bridge 266 and I/O devices 268, network adapter270, and mass storage device 272. I/O devices 268 include one or more ofany of a variety of I/O devices 268, such as a cursor control device,keyboard, speaker, microphone, an infrared (IR) signal transmitterand/or receiver, a radio signal transmitter and/or receiver, etc.Network adapter 270 provides a connection to an external network orprinter, such as to network 108 of FIG. 1 or printer 124 of FIG. 2. Massstorage device 272 provides storage for instructions and data to be usedby processor 256. Mass storage device 272 can be any one or more of amagnetic disk (e.g., a hard disk drive or floppy disk and drive), anoptical disk and drive (e.g., CD-ROM or DVD), magnetic tape and drive,etc.

[0047] In the illustrated example, printer driver 156 and filters 170 ofFIG. 1 are implemented as a series of instructions, grouped as one ormore functions, that are executed by processor(s) 256. The series ofinstructions are stored at different times in the variouscomputer-readable storage media of the computer. The series ofinstructions are received by system 252 via a distributed media (e.g.,floppy disk or CD-ROM) or from another external source (e.g., vianetwork adapter 270). The instructions are then transferred to systemmemory 258 where they are accessible to the processor(s) 256. It is alsoto be appreciated that, at different times, selected instructions mayexist in various cache memories (not shown) of system 252 (e.g., cachememories internal to processor 256, bridge 266, etc.).

[0048] The invention provides dynamic printer drivers using filters thatare operating system-independent and printer-independent. Data that isto be printed is passed through a print pipeline that includes one ormore filters that can alter various aspects of the data, one or more ofwhich are operating system-independent and printer-independent.Additionally, filters can advantageously be added to the printer drivereither during compilation of the driver or alternatively duringrun-time.

[0049] Although the invention has been described in language specific tostructural features and/or methodological steps, it is to be understoodthat the invention defined in the appended claims is not necessarilylimited to the specific features or steps described. Rather, thespecific features and steps are disclosed as preferred forms ofimplementing the claimed invention.

1. A method comprising: receiving a print request and corresponding datato be printed; converting the print request and corresponding data to anoperating system independent and printer independent representation;using, while the data is in the operating system independent and printerindependent representation, at least one of a plurality of print filtersto alter the data; and converting the altered data to aprinter-dependent representation.
 2. A method as recited in claim 1,wherein the using comprises using a print driver having a subset of theplurality of filters added to the print driver during compilation.
 3. Amethod as recited in claim 1, wherein the using comprises using a subsetof the plurality of filters that are linked to at run-time.
 4. A methodas recited in claim 1, wherein each of the plurality of print filters isto do at least one of the following: manipulate how the pagesrepresented by the data will be printed, manipulate how the imagerepresented by the data will be printed, and manipulate the destinationof the data.
 5. A method as recited in claim 1, wherein the convertingcomprises using at least one of the plurality of filters to convert thedata having the modified printing format to the printer-dependentrepresentation.
 6. A method as recited in claim 1, further comprisingtransferring the modified print request in the printer-dependentrepresentation to a printer via a network.
 7. A computer-readable mediahaving stored thereon a computer program that, when executed by at leastone processor, causes the at least one processor to perform functionsincluding: receiving a print request and corresponding data to beprinted; converting the print request and the corresponding data to anoperating system independent and printer independent format; and whenthe data is in the operating system independent and printer independentformat, using a plurality of print filters to modify the data to beprinted.
 8. A computer-readable media as recited in claim 7, wherein atleast one of the plurality of print filters is maintained in a run-timeloadable module independent of a module in which the program forreceiving the print request, translating the print request, and usingthe plurality of print filters is maintained.
 9. A computer-readablemedia as recited in claim 8, wherein the run-time loadable modulecomprises a dynamic link library (DLL).
 10. A computer-readable media asrecited in claim 7, wherein: one of the plurality of print filterscomprises a filter to translate the print request and the correspondingdata, as modified by the plurality of print filters, to aprinter-dependent representation; and the computer program, whenexecuted by the at least one processor, further causes the at least oneprocessor to transfer the modified print request and corresponding datain the printer-dependent representation to a printer.
 11. Acomputer-readable media as recited in claim 7, wherein each of theplurality of print filters is implemented in a different dynamic linklibrary (DLL).
 12. A computer-readable media as recited in claim 7,wherein the plurality of print filters are part of a printer driver, andwherein the computer program further causes the at least one processorto perform functions including: generating a settings data structurethat identifies a plurality of aspects of how the data is to be printed;and passing the settings data structure from print filter to printfilter to be used by each print filter to determine how the print filteris to modify the data.